Sensors may be used to measure characteristics of an environment. For example, an optical sensor can include an optically sensitive material that has an optical response that is sensitive to a variety of possible characteristics of the environment. A light source, such as a laser or light emitting diode (LED), is used to provide the light that interacts with the optically sensitive material. For example, the optical spectrum of the light may be selected to excite a particular optical interaction in the material such as fluorescence, which responds to the excitation light according to fluorescence behavior (e.g., various excited state decay processes) that depends on one or more characteristics of the environment. Information about these characteristics can be obtained by detecting light that is emitted from the material.